<!--<?php
require_once template('header');
print <<<EOT
<!--右边开始-->
<div id="right">
	<div class="tabs" id="recomtabs"><a class="tab but1" href="admincp.php?module=$module&action=list" >商品销售分析</a>  <a class="tab but1" href="admincp.php?module=$module&action=list&per=cart" >商品销售排行</a>  <a class="tab but1" href="admincp.php?module=$module&action=list&per=look" >商品浏览排行</a></div>
<!--商品销售排行-->
<!--
EOT;
if ($per=='cart') {
print <<<EOT
-->
	<table cellpadding="0" cellspacing="1" class="list">
		<tr>
			<th>名次</th>
			<th>商品名称</th>
			<th>总销售量</th>
			<th>库存数量</th>
			<th>共销售</th>
		</tr>
<!--
EOT;
foreach ($cart_rt as $val){
print <<<EOT
-->
		<tr>
			<td>$val[num]</td>
			<td class="td1"><a target="_blank" href="$val[url]">$val[goods_name]<span style="width:auto;"><img src="$val[goods_file1]" /></span></a></td>
			<td>$val[total_num]</td>
			<td>$val[goods_stock]</td>
			<td>$val[total_sale]</td>
		</tr>
<!--
EOT;
} print <<<EOT
-->
	</table>
<!--
EOT;
}elseif ($per=='look'){
 print <<<EOT
-->
<!--商品浏览排行-->
	<table cellpadding="0" cellspacing="1" class="list">
		<tr>
			<th>名次</th>
			<th>商品名称</th>
			<th>浏览次数</th>
		</tr>
<!--
EOT;
foreach ($look_rt as $val){
print <<<EOT
-->
		<tr>
			<td>$val[num]</td>
			<td class="td1"><a target="_blank" href="$val[url]">$val[goods_name]<span style="width:auto;"><img src="$val[goods_file1]" /></span></a></td>
			<td>$val[goods_hit]</td>
		</tr>
<!--
EOT;
} print <<<EOT
-->
	</table>
<!--
EOT;
}else { print <<<EOT
-->
<!--商品销售分析-->
	<table class="clst" align="center" cellpadding="0" cellspacing="1">
		<tr>
			<td class="tleft">商品销售分析</td>
			<td class="tright"><form name="mvmmall" action="" method="post">
 <input type="text" name="start_time" size="29" value="$start_time" id="start_time" ><input type="reset" value="..."
onclick="return showCalendar('start_time', 'y-m-d');">~ 
<input type="text" name="end_time" size="29" value="$end_time" id="end_time" ><input type="reset" value="..."
onclick="return showCalendar('end_time', 'y-m-d');">
			<input type="image" width="54" height="18" src="images/admincp/bt_counter_search.gif" style="vertical-align: -2px;"/>
</form></td>
		</tr>
	</table>
	<table cellpadding="0" cellspacing="1" class="list">
		<tr>
			<th>名次</th>
			<th>商品名称</th>
			<th>库存数量</th>
			<th>销售量</th>
			<th>原价/共计</th>
			<th>销售价/共计</th>
			<th>利 润</th>
		</tr>
<!--
EOT;
foreach ($sale_rt as $val){
print <<<EOT
-->	
		<tr>
			<td>$val[num]</td>
			<td><a href="$val[url]" target="_blank">$val[goods_name]</a></td>
			<td>$val[goods_stock]件</td>
			<td>$val[total_num] 件</td>
			<td style="color:#f30;">$val[goods_cost]/$val[toal_cost]</td>
			<td>$val[buy_price]/$val[total_sale]</td>
			<td style="color:#f30;">$val[price]</td>
		</tr>
<!--
EOT;
} print <<<EOT
-->	
	</table>
	<div class="l_title">
		<h3>销售综合统计</h3>
		<p>原价综合统计: <span style="font-weight: bold;">$total_cost</span> 元　　
		销售综合统计: <span style="font-weight: bold;">$total_sale</span> 元　　
		总利益金共计: <span style="font-weight: bold; color: #ff0000;">$total_price</span> 元
		</p>
		<p>1. 可能和实际销售有差别.<br/>
		2. 不包含运费，可能和实际金额有差别.<br/>
		3. 会员采购时使用了的积分没除外，请别实际细算使用.<br/>
		4. 上面的统计资料只做参考使用.<br/>
		</p>
	</div>
<!--
EOT;
} print <<<EOT
-->
</div>
<!--
EOT;
?>-->